﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FoundationLib.Ifc.Data
{
	/// <summary>
	/// This interface is to be implemented by data access objects providing
	/// read access to the data source.
	/// </summary>
	/// <typeparam name="TKey">The type of the unique object key</typeparam>
	/// <typeparam name="TObj">The type of the domain object</typeparam>
	public interface IReadable<TKey, TObj> where TObj : class
	{
		/// <summary>
		/// Reads the domain object instance with the given key from the data source.
		/// </summary>
		/// <param name="key">The domain object instance key</param>
		/// <returns>The domain object instance</returns>
		TObj FromKey(TKey key);
	}
}
